package HeSuanServer.controller;

import HeSuanServer.service.Impl.QrCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * @描述: 二维码生成
 * @author: LH
 * @date: 2023/2/15
 */
@CrossOrigin
@RestController
@RequestMapping("emp")
public class QrCodeController {
    @Autowired
    private QrCodeService codeService;

    //生成二维码并将其返回给前端调用者_hutool
    @GetMapping("code")
    public void generateV3(String id, HttpServletRequest request, HttpServletResponse servletResponse){
        codeService.getCodeByStatus(id,servletResponse);
    }
}
